object Form1: TForm1
  Left = 602
  Top = 220
  Width = 897
  Height = 610
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Button1: TButton
    Left = 416
    Top = 280
    Width = 75
    Height = 25
    Caption = 'Abrir'
    TabOrder = 0
    OnClick = Button1Click
  end
  object Memo1: TMemo
    Left = 16
    Top = 8
    Width = 865
    Height = 241
    Lines.Strings = (
      
        'SELECT MAT.IDMATERIAL, MAT.REFERENCIA, PRO.RAZONSOCIAL, TPAP.DES' +
        'CRIPCION TIPO_PAPEL, MAT.LASER, GEN.DESCRIPCION GENERACION, '#10
      
        #9'MAT.GRAMAJE, TUNI.DESCRIPCION TIPO_UNIDAD, MAT.LARGO, MAT.ANCHO' +
        ', MAT.FAMILIA, MAT.PRECIOCOMPRA, MAT.PRECIOVENTA, MAT.KG,'#10
      #9'CASE MAT.FAMILIA'#10
      
        #9#9'WHEN '#39'Bobinas'#39' THEN ( SELECT DESCRIPCION FROM COLORES_BOB WHER' +
        'E IDCOLOR = MAT.IDCOLOR)'#10
      
        #9#9'WHEN '#39'Papel'#39' THEN ( SELECT DESCRIPCION FROM COLORES_PAPEL WHER' +
        'E IDCOLOR = MAT.IDCOLOR)'#10
      
        #9#9'WHEN '#39'Sobres y Bolsas'#39' THEN ( SELECT DESCRIPCION FROM COLORES_' +
        'SYB WHERE IDCOLOR = MAT.IDCOLOR)'#10
      #9'END COLOR'#10
      'FROM MATERIASPRIMAS MAT'#10
      #9'LEFT JOIN PROVEEDORES PRO ON MAT.IDPROVEEDOR = PRO.IDPROVEEDOR'#10
      
        #9'LEFT JOIN TIPOSDEPAPEL TPAP ON MAT.IDTIPODEPAPEL = TPAP.IDTIPOD' +
        'EPAPEL'#10
      
        #9'LEFT JOIN GENERACIONES GEN ON MAT.IDGENERACION = GEN.IDGENERACI' +
        'ON'#10
      
        #9'LEFT JOIN TIPOSDEUNIDAD TUNI ON MAT.IDTIPOUNIDAD = TUNI.IDTIPOD' +
        'EUNIDAD'#10
      #9'LEFT JOIN COLORES_PAPEL CPAP ON MAT.IDCOLOR = CPAP.IDCOLOR;')
    TabOrder = 1
  end
  object DBGrid1: TDBGrid
    Left = 16
    Top = 312
    Width = 753
    Height = 120
    DataSource = DataSource1
    TabOrder = 2
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'MS Sans Serif'
    TitleFont.Style = []
  end
  object BBDD_Almacen: TZConnection
    ControlsCodePage = cGET_ACP
    UTF8StringsAsWideField = False
    AutoEncodeStrings = False
    Catalog = 'solgraf'
    Connected = True
    HostName = '192.168.0.11'
    Port = 0
    Database = 'solgraf'
    User = 'root'
    Password = 'solgraf'
    Protocol = 'mysql-5'
    Left = 160
    Top = 24
  end
  object qPapelesAlmacen: TZReadOnlyQuery
    Connection = BBDD_Almacen
    SQL.Strings = (
      
        'SELECT MAT.IDMATERIAL, MAT.REFERENCIA, PRO.RAZONSOCIAL, TPAP.DES' +
        'CRIPCION TIPO_PAPEL, MAT.LASER, GEN.DESCRIPCION GENERACION, '
      
        #9'MAT.GRAMAJE, TUNI.DESCRIPCION TIPO_UNIDAD, MAT.LARGO, MAT.ANCHO' +
        ', MAT.FAMILIA, MAT.PRECIOCOMPRA, MAT.PRECIOVENTA, MAT.KG,'
      #9'CASE MAT.FAMILIA'
      
        #9#9'WHEN '#39'Bobinas'#39' THEN SELECT DESCRIPCION FROM COLORES_BOB WHERE ' +
        'IDCOLOR = MAT.IDCOLOR'
      
        #9#9'WHEN '#39'Papel'#39' THEN SELECT DESCRIPCION FROM COLORES_PAPEL WHERE ' +
        'IDCOLOR = MAT.IDCOLOR'
      
        #9#9'WHEN '#39'Sobres y Bolsas'#39' THEN SELECT DESCRIPCION FROM COLORES_SY' +
        'B WHERE IDCOLOR = MAT.IDCOLOR'
      #9'END CASE COLOR'
      'FROM MATERIASPRIMAS MAT'
      #9'LEFT JOIN PROVEEDORES PRO ON MAT.IDPROVEEDOR = PRO.IDPROVEEDOR'
      
        #9'LEFT JOIN TIPOSDEPAPEL TPAP ON MAT.IDTIPODEPAPEL = TPAP.IDTIPOD' +
        'EPAPEL'
      
        #9'LEFT JOIN GENERACIONES GEN ON MAT.IDGENERACION = GEN.IDGENERACI' +
        'ON'
      
        #9'LEFT JOIN TIPOSDEUNIDAD TUNI ON MAT.IDTIPOUNIDAD = TUNI.IDTIPOD' +
        'EUNIDAD'
      #9'LEFT JOIN COLORES_PAPEL CPAP ON MAT.IDCOLOR = CPAP.IDCOLOR;'
      '')
    Params = <>
    Left = 224
    Top = 24
  end
  object DataSource1: TDataSource
    DataSet = qPapelesAlmacen
    Left = 264
    Top = 24
  end
  object ZConnection1: TZConnection
    ControlsCodePage = cGET_ACP
    UTF8StringsAsWideField = False
    AutoEncodeStrings = False
    Catalog = 'solgraf'
    Connected = True
    HostName = '192.168.0.12'
    Port = 0
    Database = 'solgraf'
    User = 'root'
    Protocol = 'mysql'
    Left = 160
    Top = 88
  end
  object ZGroupedConnection1: TZGroupedConnection
    ControlsCodePage = cGET_ACP
    UTF8StringsAsWideField = False
    AutoEncodeStrings = False
    ConnectionGroup = ZConnectionGroup1
    Left = 112
    Top = 464
  end
  object ZConnectionGroup1: TZConnectionGroup
    Left = 40
    Top = 440
    str1 = (
      '')
    str2 = (
      '')
  end
end
